import { createStore, applyMiddleware } from 'redux'; // 创建store, 使用场景是生产环境
import { thunk } from 'redux-thunk'; // 处理异步操作
import { composeWithDevTools } from '@redux-devtools/extension'; // 使用redux-devtools-extension将store与devtools连接起来，使用场景是开发环境
import rootReducer from './reducers'; // 合并所有reducers

const store = createStore(
    rootReducer,
    composeWithDevTools(applyMiddleware(thunk)),
);

export default store;
